package com.huabo.system.oracle.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("TBL_ORG_NO")
@ApiModel(value="TblOrgNo")
public class TblOrgNo implements java.io.Serializable {

	private static final long serialVersionUID = 7985409817430444480L;
	@TableId("ORGID")
	private BigDecimal orgid;
	@TableField("NOID")
	@GeneratedValue(strategy = GenerationType.IDENTITY,generator = "select HIBERNATE_SEQUENCE.nextval from dual")
	private BigDecimal noid;
	@TableField("NOCODE")
	private String nocode;
	@TableField("NOSEPARTOR")
	private String noSepartor;
	@TableField("NONUMBER")
	private Integer noNumber;
	@TableField("ISUSEDEFAULT")
	private Integer isusedefault;
	@TableField("NOSUFFIX")
	private Integer noSuffix;
	@TableField("NEWNUMBER")
	private Integer newnumber;

	@Transient
	private String noname;

	@Transient
	private TblOrgNoId id;
	@Transient
	private TblOrganization tblOrganization;
	@Transient
	private TblAutonoInfo tblAutonoInfo;

	public TblOrgNo() {
	}

	public TblOrgNo(TblOrgNoId id) {
		this.id = id;
	}

	public TblOrgNo(TblOrgNoId id, TblOrganization tblOrganization,
                    TblAutonoInfo tblAutonoInfo) {
		this.id = id;
		this.tblOrganization = tblOrganization;
		this.tblAutonoInfo = tblAutonoInfo;
	}

}